package cn.itsource.page;


import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

//网管  类似于一个负载均衡器，扶着拦截 资源的分配
@SpringBootApplication
//开启事务
@EnableTransactionManagement
//扫描接口包cn.itsource.page.mapper
@MapperScan("cn.itsource.page.mapper")
//开启feign服务  熔断器
@EnableFeignClients("cn.itsource.feignclient")
public class PageApplication2060
{
    public static void main( String[] args )
    {
        SpringApplication.run(PageApplication2060.class);
    }
    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}